/**
 * Created with CLion.
 * Description:
 * User: Auto
 */

#include "GuiPlugin.h"
#include "MainWindowService.h"

namespace CES {
    bool GuiPlugin::InitPlugin(Core::IContextSPtr _content)
    {
        if(nullptr != _content)
            contextSPtr_ = _content;

        mainWindow_ = std::make_shared<MainWindowService>();
        _content->RegistryService(Gui_Module_MainWindow_Service,mainWindow_);
        return true;
    }

    bool GuiPlugin::StartPlugin()
    {
        mainWindow_->GetMainWindow()->show();
        qDebug() << "Gui::StartPlugin";
        return true;
    }

    bool GuiPlugin::StopPlugin()
    {
        qDebug() << "Gui::StopPlugin";
        return true;
    }

    bool GuiPlugin::DeInitPlugin()
    {
        qDebug() << "Gui::DeInitPlugin";
        return true;
    }
}// namespace CES
